find critical points from the graph